<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
      xmlns:h="http://xmlns.jcp.org/jsf/html"
      xmlns:f="http://xmlns.jcp.org/jsf/core">

    <ui:composition template="/template.xhtml">
        <ui:define name="title">
            <h:outputLabel value="#{messages.Student}"></h:outputLabel>
        </ui:define>
        <ui:define name="body">
            <h:form styleClass="jsfcrud_list_form"  enctype="multipart/form-data" id="form1">
                <h:panelGrid columns="2" >
                    <h:outputLabel value="#{messages.School}"   dir="RTL"/>
                    <h:selectOneMenu value="#{schoolController.selected}" 
                                     required="true" requiredMessage="#{messages.School}" immediate="true">
                        <f:selectItem itemLabel="#{messages.Please} #{messages.Select}" />                        
                        <f:selectItems value="#{schoolController.currentSubjectSchools}"/>
                        <f:ajax render="upload"/>
                    </h:selectOneMenu>
                    <h:outputLabel value="#{messages.Student}#{messages.Excel}1997-2003 #{messages.Template}"/>
                    <h:outputLabel value="#{studentController.templateOfStudent}"/>
                    <h:outputLabel value="#{messages.Upload}"  dir="RTL"/>
                    <h:panelGrid  columns="2">
                        <h:inputFile value="#{studentController.studentExcelFile}" immediate="true"/>
                        <h:commandButton id="upload" value="#{messages.OK}" action="#{studentController.studentsUpload()}"/>
                    </h:panelGrid>
                </h:panelGrid>
            </h:form>
        </ui:define>
    </ui:composition>

</html>
